Optimal. Leaf size=45 \[ \frac {a x}{2}-\frac {i a \cos ^2(c+d x)}{2 d}+\frac {a \cos (c+d x) \sin (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3567, 2715, 8}
\begin {gather*} -\frac {i a \cos ^2(c+d x)}{2 d}+\frac {a \sin (c+d x) \cos (c+d x)}{2 d}+\frac {a x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 3567
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+i a \tan (c+d x)) \, dx &=-\frac {i a \cos ^2(c+d x)}{2 d}+a \int \cos ^2(c+d x) \, dx\\ &=-\frac {i a \cos ^2(c+d x)}{2 d}+\frac {a \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} a \int 1 \, dx\\ &=\frac {a x}{2}-\frac {i a \cos ^2(c+d x)}{2 d}+\frac {a \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 48, normalized size = 1.07 \begin {gather*} \frac {a (c+d x)}{2 d}-\frac {i a \cos ^2(c+d x)}{2 d}+\frac {a \sin (2 (c+d x))}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 42, normalized size = 0.93
method | result | size |
risch | \(\frac {a x}{2}-\frac {i a \,{\mathrm e}^{2 i \left (d x +c \right )}}{4 d}\) | \(22\) |
derivativedivides | \(\frac {-\frac {i a \left (\cos ^{2}\left (d x +c \right )\right )}{2}+a \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(42\) |
default | \(\frac {-\frac {i a \left (\cos ^{2}\left (d x +c \right )\right )}{2}+a \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(42\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 38, normalized size = 0.84 \begin {gather*} \frac {{\left (d x + c\right )} a + \frac {a \tan \left (d x + c\right ) - i \, a}{\tan \left (d x + c\right )^{2} + 1}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 23, normalized size = 0.51 \begin {gather*} \frac {2 \, a d x - i \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 39, normalized size = 0.87 \begin {gather*} \frac {a x}{2} + \begin {cases} - \frac {i a e^{2 i c} e^{2 i d x}}{4 d} & \text {for}\: d \neq 0 \\\frac {a x e^{2 i c}}{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.53, size = 23, normalized size = 0.51 \begin {gather*} \frac {2 \, a d x - i \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.23, size = 22, normalized size = 0.49 \begin {gather*} \frac {a\,x}{2}+\frac {a}{2\,d\,\left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________